package net.alpcontrol.bi.colligation.service;

import net.alpcontrol.bi.colligation.entity.PfProfit;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 丛庆
 * @since 2020-08-31
 */
public interface IPfProfitService extends IService<PfProfit> {

    /**
      *  分页查询
      * @param bootStrapTable
      * @param pfProfit
      * @return
      */
    IPage<PfProfit> selectPage(Page<PfProfit> page);

    /**
     * 根据年份和公司查询收入、利润、回款、费用、合同、成本的预算值
     * @param year
     * @return
     */
    List<Map> getBudgetByYear(String year,String companyId);

    /**
     * 导入年度预算值
     * @param year
     * @return
     */
    List<Map> importBudgets(MultipartFile file, String year, String companyId) throws Exception;


    /**
     * 导出预算excel
     * @param servletResponse
     * @param year
     * @param companyId
     */
    void exportBudget(HttpServletResponse servletResponse,String year,String companyId);

}
